package sg.edu.nus.iss.team8s.vmcs.control;

import sg.edu.nus.iss.team8s.vmcs.gui.SimulatorControlPanel;
/**
 * 
 * @author Nie XiaoYi
 *
 */
public class SimulationController {

	private SimulatorControlPanel scPanel;
	private MachineryController macController;
	private TransactionController tranController;
	private MaintenanceController mtnController;
	public SimulationController(){
		scPanel = new SimulatorControlPanel(this);
	}
	public void displaySimulationControlPanel(){
		scPanel.display();
	}
	
	public void SetSimulationActive(boolean state){
		scPanel.setSimulationActive(state);
	}
	
	public void setupCustomer(){
		scPanel.setActive(false, '1');
		tranController = TransactionController.getInstance();
		tranController.DisplayCustomerPanel(this);
	}
	
	public void setActive(boolean state, char btnID)
	{
		scPanel.setActive(state, btnID);
	}
	
	public void setupSimulator(){
		scPanel.setActive(false, '3');
		macController = MachineryController.getInstance();
		macController.displayMachineryPanel(this);
	}
	
	public void setupMaintainer(){
		scPanel.setActive(false, '2');
		mtnController = MaintenanceController.getInstance();
		mtnController.displayMaintenancePanel(this);
	}
}
